package hz.mobileproject.pda.toolsmanager.bean.response;

import com.blankj.utilcode.util.StringUtils;

import java.io.Serializable;
import java.util.List;

/**
 * Created by Lc on 2018/5/3.
 */

public class RP_ToolSysSet implements Serializable{
    private int borrow_tool;            //是否允许外借  1 允许 2 禁止
    private int call_leisure;             // 空闲库存是否清点 1 是 2 否
    private int call_object;             //清点对象 1 工具 2工位+工具 3 使用人+工具  4工位+使用人+工具
    public static final int TSS_CALL_OBJECT_ONLY_TOOLS = 1;
    public static final int TSS_CALL_OBJECT_WORKPOSITION = 2;
    public static final int TSS_CALL_OBJECT_PERSON = 3;
    public static final int TSS_CALL_OBJECT_PERSON_WORKPOSITION = 4;
    private int call_type;               // 清点方式 1 登录用户清点 2扫用户码清点
    public static final int TSS_CALL_TYPE_LOGIN_USER = 1;
    public static final int TSS_CALL_TYPE_SCAN_USER = 2;
    private int credits;                 //是否开启积分管理 1 启用 2 禁止
    private int credits_d_except;        //异常清点部门积分
    private int credits_d_normal;        //正常清点部门积分
    private int credits_d_uncall;         //未清点部门积分
    private int credits_p_except;        //异常清点积分
    private int credits_p_normal;        // 正常清点部门积分
    private long crte_time;              //创建时间
    private int crte_user_id;             //创建人
    private int cus_number;               //机构编号
    private int give_object;             //发放对象 1工位 2 使用人 3工位+使用人
    public static final int TSS_GIVE_OBJECT_WORKPOSITION = 1;
    public static final int TSS_GIVE_OBJECT_PERSON = 2;
    public static final int TSS_GIVE_OBJECT_WORKPOSITION_PERSON = 3;
    private int small_tool;              //是否开启小工具管理 1 启用 2 禁止
    private int sweep_type;             //扫码方式 1 红外 2 相机
    public static final int TSS_SWEEP_TYPE_INFRARED = 1;
    public static final int TSS_SWEEP_TYPE_CAMERA = 2;
    private long updt_time;  // 更新时间
    private int updt_user_id;       // 更新人
    private String station_prefix; //工位前缀
    public static final String PREFIX_STATION_DEFAULT = "GW";
    private String tool_prefix;    //工具前缀
    public static final String PREFIX_TOOL_DEFAULT = "GJ";
    private List<TimeData> time_data; //时间数组

    public int getBorrow_tool() {
        return borrow_tool;
    }

    public void setBorrow_tool(int borrow_tool) {
        this.borrow_tool = borrow_tool;
    }

    public int getCall_leisure() {
        return call_leisure;
    }

    public void setCall_leisure(int call_leisure) {
        this.call_leisure = call_leisure;
    }

    public int getCall_object() {
        return call_object;
    }

    public void setCall_object(int call_object) {
        this.call_object = call_object;
    }

    public int getCall_type() {
        return call_type;
    }

    public void setCall_type(int call_type) {
        this.call_type = call_type;
    }

    public int getCredits() {
        return credits;
    }

    public void setCredits(int credits) {
        this.credits = credits;
    }

    public int getCredits_d_except() {
        return credits_d_except;
    }

    public void setCredits_d_except(int credits_d_except) {
        this.credits_d_except = credits_d_except;
    }

    public int getCredits_d_normal() {
        return credits_d_normal;
    }

    public void setCredits_d_normal(int credits_d_normal) {
        this.credits_d_normal = credits_d_normal;
    }

    public int getCredits_d_uncall() {
        return credits_d_uncall;
    }

    public void setCredits_d_uncall(int credits_d_uncall) {
        this.credits_d_uncall = credits_d_uncall;
    }

    public int getCredits_p_except() {
        return credits_p_except;
    }

    public void setCredits_p_except(int credits_p_except) {
        this.credits_p_except = credits_p_except;
    }

    public int getCredits_p_normal() {
        return credits_p_normal;
    }

    public void setCredits_p_normal(int credits_p_normal) {
        this.credits_p_normal = credits_p_normal;
    }

    public long getCrte_time() {
        return crte_time;
    }

    public void setCrte_time(long crte_time) {
        this.crte_time = crte_time;
    }

    public int getCrte_user_id() {
        return crte_user_id;
    }

    public void setCrte_user_id(int crte_user_id) {
        this.crte_user_id = crte_user_id;
    }

    public int getCus_number() {
        return cus_number;
    }

    public void setCus_number(int cus_number) {
        this.cus_number = cus_number;
    }

    public int getGive_object() {
        return give_object;
    }

    public void setGive_object(int give_object) {
        this.give_object = give_object;
    }

    public int getSmall_tool() {
        return small_tool;
    }

    public void setSmall_tool(int small_tool) {
        this.small_tool = small_tool;
    }

    public int getSweep_type() {
        return sweep_type;
    }

    public void setSweep_type(int sweep_type) {
        this.sweep_type = sweep_type;
    }

    public long getUpdt_time() {
        return updt_time;
    }

    public void setUpdt_time(long updt_time) {
        this.updt_time = updt_time;
    }

    public int getUpdt_user_id() {
        return updt_user_id;
    }

    public void setUpdt_user_id(int updt_user_id) {
        this.updt_user_id = updt_user_id;
    }

    public String getStationPrefix() {
        if(StringUtils.isEmpty(station_prefix)){
            return PREFIX_STATION_DEFAULT;
        }
        return station_prefix;
    }

    public void setStationPrefix(String stationPrefix) {
        this.station_prefix = stationPrefix;
    }

    public String getToolPrefix() {
        if(StringUtils.isEmpty(tool_prefix)){
            return PREFIX_TOOL_DEFAULT;
        }
        return tool_prefix;
    }

    public void setToolPrefix(String toolPrefix) {
        this.tool_prefix = toolPrefix;
    }

    public List<TimeData> getTime_data() {
        return time_data;
    }

    public void setTime_data(List<TimeData> time_data) {
        this.time_data = time_data;
    }

    public class TimeData implements Serializable{
        private String start_time;  	  // 清点开始时间
        private String end_time; 		  // 清点结束时间

        public String getStart_time() {
            return start_time;
        }

        public void setStart_time(String start_time) {
            this.start_time = start_time;
        }

        public String getEnd_time() {
            return end_time;
        }

        public void setEnd_time(String end_time) {
            this.end_time = end_time;
        }
    }
}
